package com.ys.utils.redis.key;

public class WalletKey {

    /**
     * 红包领取key
     * @return
     */
    public static String userWalletKey() {
        return String.format("wallet:cache");
    }

    /**
     * 红包领取key
     * @return
     */
    public static String redPacketGrabHistory(Object serialNumber) {
        return String.format("wallet:redPacket:%s", serialNumber);
    }

    /**
     * 抢红吧限制
     * @param groupId
     * @param uid
     * @return
     */
    public static String gradUserNumKey(Object groupId,Object uid,Object time){
        return String.format("sxy:red:group:risk:%s_%s_%s",groupId,uid,time);
    }

    /**
     * 取消抢红吧限制
     * @param groupId
     * @return
     */
    public static String gradGroupKey(Object groupId){
        return String.format("sxy:red:group:risk:%s_*",groupId);
    }

    /**
     * 快捷支付发红包、转账key，用于存储红包、转账的信息
     * @param requestId 商户订单号
     * @param businessType  资金类型 2红包 3转账
     * @return
     */
    public static String orderBusinessType(Object requestId,Object businessType){
        return String.format("order:businessType:%s_%s",requestId,businessType);
    }

    /**
     * 首信易快捷支付发红包、转账key，用于存储红包、转账的信息
     * @param requestId 商户订单号
     * @param businessType  资金类型 2红包 3转账
     * @return
     */
    public static String sxyOrderBusinessType(Object requestId,Object businessType){
        return String.format("sxy:order:businessType:%s_%s",requestId,businessType);
    }
}
